HTMLify

index.html
Views: 51 | Author: cody
<!DOCTYPE html>
<html>

<head>
    <meta charset='utf-8'>
    <meta http-equiv='X-UA-Compatible' content='IE=edge'>
    <title>Expanding Share Button</title>
    <meta name='viewport' content='width=device-width, initial-scale=1'>

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link href="https://fonts.googleapis.com/css2?family=Nunito:wght@500&display=swap" rel="stylesheet" />
    <link rel='stylesheet' type='text/css' media='screen' href='style.css'>
</head>

<body>

    <button class="share__btn" id="shareBtn">
        <i class="fa-solid fa-arrow-up-right-from-square share__icon"></i>
        <span class="social__icons">
            <i class="fa-brands fa-facebook-f"></i>
            <i class="fa-brands fa-twitter"></i>
            <i class="fa-brands fa-instagram"></i>
        </span>
    </button>

    <script>
        let shareBtn = document.getElementById("shareBtn");

        shareBtn.addEventListener("click", () => {
            shareBtn.classList.toggle("open");
        });
    </script>

</body>

</html>

Comments